<template>
	<view>
		<view class="centent">
			<view class="form">
				<view class="item-top">
					<view class="item-top-left">
						<view class="item-icon">
							<image :src="type == 1 ? '/static/images/take.png' : '/static/images/collect.png'" mode="widthFix"></image>
						</view>
						<view class="item-name">
							<text>张三  18782267676</text>
						</view>
					</view>
					<view class="item-top-right" @click.stop="$msx.toPage('/pages/address/index')">
						<view class="right-icon">
							<image src="/static/images/address-book.png" mode="widthFix"></image>
						</view>
						<view class="right-title">
							<text>地址库</text>
						</view>
					</view>
				</view>
				<view class="item-user">
					<view class="user-info">
						<view class="user-name">
							<input type="text" placeholder="姓名" placeholder-style="color:#999;font-size:30rpx;">
						</view>
						<view class="user-right">
							<view class="user-hr"></view>
							<view class="user-phone">
								<input type="text" placeholder="联系方式" placeholder-style="color:#999;font-size:30rpx;">
							</view>
						</view>
					</view>
					<view class="user-city">
						<view class="user-city-name" :style="city ? 'color: #333;font-weight: bold;' : ''">
							<text>{{city || '请选择省/市/区'}}</text>
						</view>
						<view class="user-city-icon">
							<image src="/static/images/right1.png" mode="widthFix"></image>
						</view>
					</view>
					<view class="user-address">
						<textarea placeholder="请填写详细地址" v-model="address" auto-height placeholder-style="color:#999;font-size:30rpx;font-weight: 500;"></textarea>
						
					</view>
				</view>
			</view>
		</view>
		<view class="bottom">
			<view class="bottom-content">
				<view class="bottom-select">
					<view class="select-icon">
						<image :src="select ? '/static/images/radio-active.png' : '/static/images/radio.png'" @click="select = !select" mode="widthFix"></image>
					</view>
					<view class="select-title">
						<text>保存到地址库</text>
					</view>
				</view>
				<view class="bottom-btn">
					<text>立即保存</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				city:'江西省宜春市袁州区',
				address:'',
				select:false,
				type:1
			}
		},
		onLoad(options) {
			this.type = options.type;
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
page{
	background-color: #FFF;
}
.centent{
	padding: 30rpx;
	box-sizing: border-box;
	.form{
		width: 100%;
		background: #FFFFFF;
		box-shadow: 2rpx 2rpx 28rpx 0px rgba(0, 0, 0, 0.06);
		border-radius: 20rpx;
		padding-top: 30rpx;
		.item-top{
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding-right: 30rpx;
			box-sizing: border-box;
			.item-top-left{
				display: flex;
				justify-content: flex-start;
				align-items: center;
				.item-icon{
					display: flex;
					justify-content: center;
					align-items: center;
					image{
						width: 48rpx;
						height: 48rpx;
					}
				}
				.item-name{
					font-size: 32rpx;
					color: #333;
					font-weight: bold;
					padding-left: 14rpx;
				}
			}
			.item-top-right{
				display: flex;
				justify-content: center;
				align-items: center;
				width: 144rpx;
				height: 52rpx;
				border-radius: 28rpx;
				border: 2rpx solid #E9E9E9;
				.right-icon{
					display: flex;
					justify-content: center;
					align-items: center;
					image{
						width: 24rpx;
						height: 26rpx;
					}
				}
				.right-title{
					margin-left: 10rpx;
					font-size: 24rpx;
					color: #333;
					font-weight: bold;
				}
			}
		}
		.item-user{
			padding: 0 30rpx;
			box-sizing: border-box;
			.user-info{
				padding: 38rpx 0;
				display: flex;
				justify-content: space-between;
				align-items: center;	
				border-bottom: 2rpx solid #F8F8F8;
				.user-name{
					width: 230rpx;
					input{
						width: inherit;
						font-size: 30rpx;
						color: #333;
						font-weight: 500;
					}
				}
				.user-right{
					display: flex;
					flex: 1;
					justify-content: flex-start;
					align-items: center;
					.user-hr{
						width: 4rpx;
						height: 28rpx;
						background: #F5F5F5;
						border-radius: 3rpx;
					}
					.user-phone{
						padding-left: 26rpx;
					}
				}
			}
			.user-city{
				padding: 38rpx 0;
				display: flex;
				justify-content: space-between;
				align-items: center;	
				border-bottom: 2rpx solid #F8F8F8;
				.user-city-name{
					font-size: 30rpx;
					color: #999;
					font-weight: 500;
				}
				.user-city-icon{
					display: flex;
					justify-content: center;
					align-items: center;
					image{
						width: 20rpx;
						height: 20rpx;
					}
				}
			}
			.user-address{
				width: 100%;
				textarea{
					width: 100%;
					padding: 38rpx 0;
					font-size: 30rpx;
					color: #333;
					font-weight: bold;
				}
			}	
		}
	}
}
.bottom{
	.bottom-content{
		position: fixed;
		bottom: 40rpx;
		padding: 0 30rpx;
		width: 100%;
		box-sizing: border-box;
		.bottom-select{
			display: flex;
			justify-content: flex-start;
			align-items: center;
			.select-icon{
				display: flex;
				justify-content: center;
				align-items: center;
				image{
					width: 24rpx;
					height: 24rpx;
				}
			}
			.select-title{
				padding-left: 12rpx;
				font-size: 24rpx;
				color: #999;
				font-weight: 500;
			}
		}
		.bottom-btn{
			margin-top: 26rpx;
			width: 100%;
			height: 88rpx;
			background: #E82E2E;
			border-radius: 16rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			font-size: 32rpx;
			color: #FFF;
			font-weight: bold;
		}
	}
}
</style>
